package com.zufe.khw;

import java.util.Arrays;

public class LambdaDemo2 {
    public static void main(String[] args) {
        String[] arr = {"a", "aaa", "aaaa","aa"};
        Arrays.sort(arr, (o1, o2) -> o1.length() - o2.length());
        System.out.println(Arrays.toString(arr));
    }
}
